﻿package mortal.game.view.palyer
{
    import Message.BroadCast.*;
    import Message.Public.*;
    import baseEngine.modifiers.*;
    import baseEngine.system.*;
    import com.gengine.core.frame.*;
    import com.gengine.global.*;
    import com.greensock.layout.*;
    import com.mui.controls.*;
    import com.mui.core.*;
    import com.mui.events.*;
    import com.mui.manager.*;
    import com.mui.utils.*;
    import extend.language.*;
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;
    import flash.utils.*;
    import frEngine.*;
    import frEngine.event.*;
    import frEngine.pools.*;
    import frEngine.primitives.object2d.*;
    import mortal.common.*;
    import mortal.common.display.*;
    import mortal.common.global.*;
    import mortal.component.gconst.*;
    import mortal.component.window.*;
    import mortal.game.cache.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.manager.window3d.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.scene3D.model.player.*;
    import mortal.game.scene3D.model.pools.*;
    import mortal.game.scene3D.player.entity.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.display.*;
    import mortal.game.view.common.item.*;
    import mortal.game.view.forging.data.*;
    import mortal.game.view.medal.*;
    import mortal.game.view.medal.view.*;
    import mortal.game.view.palyer.data.*;
    import mortal.game.view.palyer.item.*;
    import mortal.game.view.platform.*;
    import mortal.game.view.platform.platformTencent.*;
    import mortal.mvc.core.*;

    public class PlayerModelPanel extends GSprite
    {
        private var _frameTimer:FrameTimer;
        private var _selfSign:String;
        private var _guildTxt:GTextFiled;
        private var _playerTitle:GTextFiled;
        private var _levelAndNameAndCarrar:GTextFiled;
        protected var _equipPanel:PlayerEquipPark;
        private var _declaration:GTextInput;
        private var _leftBtn:GLoadedButton;
        private var _rightBtn:GLoadedButton;
        private var _roleModelPlayer:RoleModelPlayer;
        private var _vipIcon:GImageBitmap;
        private var _bg:GImageBitmap;
        private var _signatureTextBox:TextBox;
        private var _signatureText:GTextInput;
        private var _signatureBtn:GLoadingButton;
        private var _medalPanel:MedalBigIcon;
        private var _qqSpr:ToolTipSprite;
        private var _qqIcon:GImageBitmap;
        protected var _rect3d:Rect3DObject;
        private var _3dRotationSp:GSprite;
        private var _3dRotationBm:GBitmap;
        protected var _window:Window;
        private var _halidomSp:RoleHalidomPanel;
        protected var _changeBtn:GLoadingButton;
        protected var _changeBtn2:GLoadingButton;
        private var _haliShow:Boolean = false;
        private var _startX:Number;
        private var _endX:Number;
        private var _img2d:Img2D;
        private var _effectPlayer:EffectPlayer;
        private var _effectPlayer2:EffectPlayer;
        private var _effectPlayer3:EffectPlayer;
        private var turnValue:int;

        public function PlayerModelPanel(param1:Window)
        {
            this._window = param1;
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            var qqVipViewShow:Function;
            super.createDisposedChildrenImpl();
            this._3dRotationSp = UICompomentPool.getUICompoment(GSprite);
            this._3dRotationSp.x = 5;
            this._3dRotationSp.y = 38;
            this._3dRotationSp.mouseEnabled = true;
            this._3dRotationBm = GlobalClass.getBitmap(BitmapDataConst.AlphaBMD);
            this._3dRotationBm.width = 500;
            this._3dRotationBm.height = 480;
            this._3dRotationSp.addChild(this._3dRotationBm);
            this._bg = UIFactory.gImageBitmap(ImagesConst.playerModule_RoleBg, 11, 38, null, this.add2d);
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.mountTitleBg, 13, 43, this._window.contentTopOf3DSprite));
            this._window.contentTopOf3DSprite.addChild(this._3dRotationSp);
            this._vipIcon = UIFactory.gImageBitmap("", 430, 50, this._window.contentTopOf3DSprite);
            var textFormat:* = GlobalStyle.textFormatBai.center();
            textFormat.size = 13;
            textFormat.align = AlignMode.CENTER;
            this._guildTxt = UIFactory.gTextField("", 160, 81, 200, 30, this._window.contentTopOf3DSprite, textFormat, true);
            var _loc_2:Boolean = false;
            this._guildTxt.mouseEnabled = false;
            this._guildTxt.selectable = _loc_2;
            this._playerTitle = UIFactory.gTextField("", 135, 106, 200, 30, this._window.contentTopOf3DSprite, GlobalStyle.textFormatHuang2.center(), true);
            this._signatureBtn = UIFactory.gLoadingButton(ResFileConst.TitleChangeBtn, 310, 108 - 2, 46, 23, this._window.contentTopOf3DSprite);
            this._signatureBtn.configEventListener(MouseEvent.CLICK, this.onTitleClickHandler);
            this._signatureBtn.toolTipData = Language.getString(35031);
            textFormat.size = 13;
            this._levelAndNameAndCarrar = UIFactory.gTextField("", 157, 50, 200, 30, this._window.contentTopOf3DSprite, textFormat, true);
            if (PlatformConst.isQQ() && PlatformTencentUtil.isBlueEnter())
            {
                qqVipViewShow = function (event:MouseEvent) : void
            {
                Dispatcher.dispatchEvent(new Event(EventName.PlatformTencentShow));
                return;
            }// end function
            ;
                this._qqSpr = UICompomentPool.getUICompoment(ToolTipSprite);
                this._qqSpr.move(127, 55);
                this._window.contentTopOf3DSprite.addChild(this._qqSpr);
                this._qqIcon = UIFactory.gImageBitmap("", 0, 0, this._qqSpr);
                this._qqSpr.mouseChildren = false;
                this._qqSpr.mouseEnabled = true;
                this._qqSpr.buttonMode = true;
                this._qqSpr.toolTipData = PlatformTencentUtil.getLanZuanTips;
                this._qqSpr.configEventListener(MouseEvent.CLICK, qqVipViewShow);
                Dispatcher.addEventListener(EventName.PlatformQQVipInfoGet, this.addQQVipIcon);
                this.addQQVipIcon();
            }
            this._leftBtn = UIFactory.gLoadedButton(ImagesConst.TurnLeft2_upSkin, 330, 483, 40, 36, this._window.contentTopOf3DSprite);
            this._leftBtn.configEventListener(MouseEvent.MOUSE_DOWN, this.onClickTurnBtn);
            this._rightBtn = UIFactory.gLoadedButton(ImagesConst.TurnRight2_upSkin, 141, 483, 40, 36, this._window.contentTopOf3DSprite);
            this._rightBtn.configEventListener(MouseEvent.MOUSE_DOWN, this.onClickTurnBtn);
            Global.stage.addEventListener(MouseEvent.MOUSE_UP, this.stopTurning);
            this._equipPanel = UICompomentPool.getUICompoment(PlayerEquipPark);
            this._equipPanel.createDisposedChildren();
            this._equipPanel.x = 131;
            this._equipPanel.y = 90;
            this._window.contentTopOf3DSprite.addChild(this._equipPanel);
            this.configEventListener(DragEvent.Event_Move_In, this.moveInHandler);
            this._signatureTextBox = this.createTextBox(1);
            this._signatureTextBox.textField.autoSize = AlignMode.LEFT;
            this._signatureTextBox.x = 23;
            this._signatureTextBox.y = 557;
            this._signatureTextBox.bgWidth = 445;
            this._signatureTextBox.bgHeight = 25;
            this._signatureTextBox.htmlText = Language.getString(35519);
            this._signatureText = UIFactory.gTextInput(85, 556, 445, 25, this._window.contentTopOf3DSprite, null);
            this._signatureText.editable = false;
            this._signatureText.maxChars = 15;
            var bm:* = new Bitmap(GlobalClass.getBitmapData(BitmapDataConst.AlphaBMD));
            this._signatureText.setStyle("upSkin", bm);
            this._signatureText.setStyle("disabledSkin", bm);
            this._signatureText.setStyle("focusRectSkin", bm);
            this._signatureText.configEventListener(FocusEvent.FOCUS_IN, this.editSign);
            this._signatureText.configEventListener(FocusEvent.FOCUS_OUT, this.updateSign);
            this._changeBtn = UIFactory.gLoadingButton(ImagesConst.RoleHalidomEBtn_upSkin, 26, 50, 58, 25, this._window.contentTopOf3DSprite);
            this._changeBtn.label = "";
            this._changeBtn2 = UIFactory.gLoadingButton(ImagesConst.RoleHalidomHBtn_upSkin, 26, 50, 58, 25, this._window.contentTopOf3DSprite);
            this._changeBtn2.label = "";
            this._medalPanel = UICompomentPool.getUICompoment(MedalBigIcon);
            this._medalPanel.move(395, 77);
            this._medalPanel.toolTipData = this.getMedalData();
            this._window.contentTopOf3DSprite.addChild(this._medalPanel);
            this._changeBtn.configEventListener(MouseEvent.CLICK, this.onChHd);
            this._changeBtn2.configEventListener(MouseEvent.CLICK, this.onChHd);
            if (RoleHalidomPanel.levelEnougth())
            {
                this._changeBtn.visible = false;
                this._changeBtn2.visible = true;
            }
            else
            {
                this._changeBtn.visible = false;
                this._changeBtn2.visible = false;
            }
            this.updateGuild();
            this.updatePlayerInfo();
            this.updateTitle();
            this.updateMedal();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            Dispatcher.removeEventListener(EventName.PlatformQQVipInfoGet, this.addQQVipIcon);
            Global.stage.removeEventListener(MouseEvent.MOUSE_DOWN, this.startTurn);
            Global.stage.removeEventListener(MouseEvent.MOUSE_UP, this.stopTurn);
            if (this._qqIcon)
            {
                this._qqIcon.dispose(param1);
                this._qqIcon = null;
            }
            if (this._qqSpr)
            {
                this._qqSpr.dispose(param1);
                this._qqSpr = null;
            }
            this._changeBtn = null;
            this._changeBtn2 = null;
            this._halidomSp = null;
            this._haliShow = false;
            this._guildTxt.dispose(param1);
            this._levelAndNameAndCarrar.dispose(param1);
            this._equipPanel.dispose(param1);
            this._leftBtn.dispose(param1);
            this._rightBtn.dispose(param1);
            this._vipIcon.dispose(param1);
            this._signatureTextBox.dispose(param1);
            this._signatureText.dispose(param1);
            this._3dRotationSp.dispose(param1);
            this._3dRotationBm.dispose(param1);
            this._bg.dispose(param1);
            this._playerTitle.dispose(param1);
            this._signatureBtn.dispose(param1);
            this._medalPanel.dispose(param1);
            this._3dRotationSp = null;
            this._3dRotationBm = null;
            this._guildTxt = null;
            this._levelAndNameAndCarrar = null;
            this._equipPanel = null;
            this._leftBtn = null;
            this._rightBtn = null;
            this._medalPanel = null;
            this._vipIcon = null;
            this._signatureTextBox = null;
            this._signatureText = null;
            this._bg = null;
            this._playerTitle = null;
            this._signatureBtn = null;
            this.remove3d();
            if (this._rect3d)
            {
                Rect3DManager.instance.disposeRect3d(this._rect3d);
                this._rect3d = null;
            }
            if (this._roleModelPlayer)
            {
                this._roleModelPlayer = null;
            }
            this.stopTurning();
            Global.stage.removeEventListener(MouseEvent.MOUSE_UP, this.stopTurning);
            super.disposeImpl(param1);
            return;
        }// end function

        private function addQQVipIcon(event:Event = null) : void
        {
            var _loc_2:String = null;
            if (PlatformTencentUtil.getVipLevel() > 0)
            {
                _loc_2 = PlatformTencentUtil.getQQVipIconUrl();
                this._qqIcon.imgUrl = _loc_2;
            }
            return;
        }// end function

        private function getMedalData() : MedalData
        {
            var _loc_1:* = new MedalData();
            _loc_1.totalMedalDic = Cache.instance.medal.medalDic;
            return _loc_1;
        }// end function

        private function onChHd(event:MouseEvent) : void
        {
            var _loc_2:Boolean = false;
            if (this._changeBtn2 == event.currentTarget)
            {
                _loc_2 = true;
            }
            if (this._haliShow != _loc_2)
            {
                this._haliShow = _loc_2;
                this.showHaliDom(this._haliShow);
            }
            return;
        }// end function

        private function showHaliDom(param1:Boolean) : void
        {
            this._equipPanel.visible = !param1;
            this._leftBtn.visible = !param1;
            this._rightBtn.visible = !param1;
            this._signatureTextBox.visible = !param1;
            this._signatureText.visible = !param1;
            this._signatureBtn.visible = !param1;
            this._medalPanel.visible = !param1;
            this._changeBtn.visible = param1;
            this._changeBtn2.visible = !param1;
            if (this._img2d)
            {
                this._img2d.visible = !param1;
            }
            if (param1)
            {
                this._playerTitle.x = 180;
                if (this._halidomSp == null)
                {
                    this._halidomSp = UIFactory.getUICompoment(RoleHalidomPanel, 7, 60, this._window.contentTopOf3DSprite);
                }
                this._halidomSp.init3DMd(this._rect3d);
            }
            else
            {
                this._playerTitle.x = 158;
                if (this._halidomSp)
                {
                    this._halidomSp.dispose();
                    this._halidomSp = null;
                }
            }
            return;
        }// end function

        private function startTurn(event:MouseEvent) : void
        {
            this._startX = this.mouseX;
            this._3dRotationSp.configEventListener(MouseEvent.MOUSE_MOVE, this.turning);
            return;
        }// end function

        private function stopTurn(event:MouseEvent) : void
        {
            this._3dRotationSp.removeEventListener(MouseEvent.MOUSE_MOVE, this.turning);
            return;
        }// end function

        private function turning(event:MouseEvent) : void
        {
            this._endX = this.mouseX;
            if (this._roleModelPlayer)
            {
                this._roleModelPlayer.rotationY = this._roleModelPlayer.rotationY - (this._endX - this._startX) / 2;
            }
            this._startX = this._endX;
            return;
        }// end function

        private function createTextBox(param1:int = 1) : TextBox
        {
            var _loc_2:* = GlobalStyle.textFormatHuang;
            _loc_2.align = AlignMode.CENTER;
            var _loc_3:* = UICompomentPool.getUICompoment(TextBox);
            _loc_3.createDisposedChildren();
            _loc_3.setbgStlye(ImagesConst.PanelBg, _loc_2);
            _loc_3.textField.y = 1;
            _loc_3.textFieldHeight = 15;
            _loc_3.textFieldWidth = 80;
            _loc_3.bgHeight = 23;
            _loc_3.bgWidth = 137;
            _loc_3.x = (param1 - 1) * 141 + 16;
            _loc_3.y = 90;
            this._window.contentTopOf3DSprite.addChild(_loc_3);
            return _loc_3;
        }// end function

        private function add2d() : void
        {
            if (isDisposed)
            {
                return;
            }
            this.add3DRole();
            if (this._img2d && this._rect3d)
            {
                this._rect3d.removeImg(this._img2d);
            }
            this._img2d = new Img2D(null, this._bg.bitmapData, new Rectangle(0, 0, 490, 546), false);
            this._rect3d.addImg(this._img2d);
            this.updateRoleModel();
            this.showHaliDom(this._haliShow);
            return;
        }// end function

        protected function add3DRole() : void
        {
            if (this._rect3d == null)
            {
                this._rect3d = Rect3DManager.instance.registerWindow(true, new Rectangle(11, 38, 490, 546), this._window);
            }
            Rect3DManager.instance.windowShowHander(null, this._window);
            if (this._halidomSp)
            {
                this._halidomSp.init3DMd(this._rect3d);
            }
            return;
        }// end function

        protected function updateRoleModel() : void
        {
            if (this._rect3d)
            {
                if (this._roleModelPlayer == null)
                {
                    this._roleModelPlayer = FrObjectPool.getObject(RoleModelPlayer, this);
                }
                this._roleModelPlayer.entityInfo = Cache.instance.role.roleEntityInfo;
                this._roleModelPlayer.scaleAll = 2.2;
                this._roleModelPlayer.setRenderList(this._rect3d.renderList);
                this._roleModelPlayer.useLight();
                this._roleModelPlayer.rotationY = 0;
                this._rect3d.addObject3d(this._roleModelPlayer, 243, 465);
            }
            Global.stage.addEventListener(MouseEvent.MOUSE_DOWN, this.startTurn);
            Global.stage.addEventListener(MouseEvent.MOUSE_UP, this.stopTurn);
            this.playTransferEffect();
            return;
        }// end function

        private function playTransferEffect() : void
        {
            if (this._rect3d)
            {
                this._rect3d.disposeObj3d(this._effectPlayer);
                this._effectPlayer = EffectPlayerPool.instance.getEffectPlayer("GS-shanbi1", null, this._rect3d.renderList, false);
                this._effectPlayer.play(PlayMode.ANIMATION_LOOP_MODE);
                FrEventDispatcher.instance.proxyAddEventListener(this._effectPlayer, Engine3dEventName.PLAYEND, this.playEndHander);
                this._rect3d.addObject3d(this._effectPlayer, 280, 220);
                this._effectPlayer2 = EffectPlayerPool.instance.getEffectPlayer("GS-shanbi1", null, this._rect3d.renderList, false);
                setTimeout(this.playEffect, 1000, this._effectPlayer2);
                FrEventDispatcher.instance.proxyAddEventListener(this._effectPlayer2, Engine3dEventName.PLAYEND, this.playEndHander);
                this._rect3d.addObject3d(this._effectPlayer2, 130, 350);
                this._effectPlayer3 = EffectPlayerPool.instance.getEffectPlayer("GS-shanbi1", null, this._rect3d.renderList, false);
                setTimeout(this.playEffect, 2000, this._effectPlayer3);
                FrEventDispatcher.instance.proxyAddEventListener(this._effectPlayer3, Engine3dEventName.PLAYEND, this.playEndHander);
                this._rect3d.addObject3d(this._effectPlayer3, 330, 320);
            }
            return;
        }// end function

        private function playEffect(param1:EffectPlayer) : void
        {
            param1.play(PlayMode.ANIMATION_LOOP_MODE);
            return;
        }// end function

        private function playEndHander(event:Event) : void
        {
            return;
        }// end function

        private function remove3d() : void
        {
            if (this._rect3d)
            {
                this._rect3d.removeImg(this._img2d);
                this._rect3d.disposeObj3d(this._roleModelPlayer);
                this._rect3d.disposeObj3d(this._effectPlayer);
                this._rect3d.disposeObj3d(this._effectPlayer2);
                this._rect3d.disposeObj3d(this._effectPlayer3);
                this._img2d = null;
                this._effectPlayer = null;
                this._roleModelPlayer = null;
                this._effectPlayer2 = null;
                this._effectPlayer3 = null;
            }
            return;
        }// end function

        private function editSign(event:FocusEvent) : void
        {
            if (Cache.instance.role.entityInfo.level < 55)
            {
                this._signatureText.editable = false;
                MsgManager.showRollTipsMsg("55级才能设置个性签名");
                return;
            }
            this._signatureText.editable = false;
            if (this._signatureText.text == Language.getString(30144))
            {
                this._signatureText.text = "";
            }
            return;
        }// end function

        private function updateSign(event:FocusEvent) : void
        {
            if (this._signatureText.text != this._selfSign)
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.SignatureUpdate, this._signatureText.text));
            }
            this._selfSign = this._signatureText.text;
            if (this._signatureText.text == "")
            {
                this._signatureText.text = Language.getString(30144);
            }
            return;
        }// end function

        protected function onClickTurnBtn(event:MouseEvent) : void
        {
            if (this._roleModelPlayer)
            {
                if (event.currentTarget == this._leftBtn)
                {
                    this.turnValue = 2;
                }
                if (event.currentTarget == this._rightBtn)
                {
                    this.turnValue = -2;
                }
                this.start();
            }
            return;
        }// end function

        protected function stopTurning(event:MouseEvent = null) : void
        {
            if (this._frameTimer)
            {
                this._frameTimer.stop();
            }
            return;
        }// end function

        protected function onTurning(param1:FrameTimer) : void
        {
            if (this._roleModelPlayer)
            {
                this._roleModelPlayer.rotationY = this._roleModelPlayer.rotationY + this.turnValue;
            }
            return;
        }// end function

        private function start() : void
        {
            if (!this._frameTimer)
            {
                this._frameTimer = new FrameTimer(1, int.MAX_VALUE, true);
                this._frameTimer.addListener(TimerType.ENTERFRAME, this.onTurning);
            }
            this._frameTimer.start();
            return;
        }// end function

        private function moveInHandler(event:DragEvent) : void
        {
            var _loc_4:int = 0;
            var _loc_5:int = 0;
            var _loc_6:String = null;
            var _loc_7:int = 0;
            var _loc_2:* = event.dragItem as BaseItem;
            var _loc_3:* = event.dropItem as BaseItem;
            if (_loc_2 && _loc_2.itemData.serverData.posType != EPlayerItemPosType._EPlayerItemPosTypeRole)
            {
                _loc_4 = _loc_2.itemData.itemInfo.type;
                _loc_5 = _loc_2.itemData.itemInfo.category;
                _loc_6 = "";
                _loc_7 = -1;
                if (_loc_3)
                {
                    Dispatcher.dispatchEvent(new DataEvent(EventName.BackPack_Equip, _loc_2.itemData));
                }
            }
            return;
        }// end function

        private function onTitleClickHandler(event:MouseEvent) : void
        {
            GameManager.instance.popupView(GameController.title.view);
            return;
        }// end function

        private function getCareer(param1:int) : String
        {
            return GameDefConfig.instance.getCarrer(param1);
        }// end function

        public function updataAllInfo() : void
        {
            this.updateSignature();
            this.updateVip();
            return;
        }// end function

        public function updateEquipByType(param1:int) : void
        {
            var _loc_2:* = new EquipUpdateParamInfo();
            _loc_2.isNeedUpdateStrengInfo = true;
            _loc_2.isNeedUpdateEmbedInfo = false;
            this._equipPanel.updateEquipByType(param1, _loc_2);
            this._haliShow = false;
            this.showHaliDom(this._haliShow);
            return;
        }// end function

        public function updateHalidomEquipByType(param1:int) : void
        {
            this._haliShow = true;
            if (this._halidomSp)
            {
                this._halidomSp.updateEquipByType(param1);
            }
            else
            {
                this.showHaliDom(this._haliShow);
            }
            return;
        }// end function

        public function updateAllEquip() : void
        {
            this._equipPanel.updateAllEquip();
            return;
        }// end function

        public function updateSignature() : void
        {
            var _loc_1:* = Cache.instance.role.playerInfo.signature == "" ? (Language.getString(30144)) : (Cache.instance.role.playerInfo.signature);
            this._signatureText.htmlText = "<font color=\'#a49e91\'>" + _loc_1 + "</font>";
            return;
        }// end function

        public function updateVip() : void
        {
            if (Cache.instance.vip.level > 0)
            {
                this._vipIcon.imgUrl = GameDefConfig.instance.getVipLevelIconUrl(Cache.instance.vip.level, 2);
                this._vipIcon.filters = [];
            }
            else
            {
                this._vipIcon.imgUrl = GameDefConfig.instance.getVipLevelIconUrl(0, 2);
                this._vipIcon.filters = [FilterConst.colorFilter2];
            }
            return;
        }// end function

        public function updataNmae() : void
        {
            this._levelAndNameAndCarrar.text = Cache.instance.role.entityInfo.level + "级 · " + this.getCareer(Cache.instance.role.entityInfo.career);
            return;
        }// end function

        public function updateGuild() : void
        {
            var _loc_1:int = 0;
            if (Cache.instance.guild.selfGuildInfo.selfInfo)
            {
                _loc_1 = Cache.instance.guild.selfGuildInfo.selfInfo.position;
                this._guildTxt.htmlText = "<font color=\'#f8eacd\'>" + Cache.instance.guild.selfGuildInfo.selfInfo.guildName + " · " + GameDefConfig.instance.getItem("EGuildPostion", _loc_1).text + "</font>";
            }
            else
            {
                this._guildTxt.htmlText = "";
            }
            return;
        }// end function

        public function updatePlayerInfo() : void
        {
            var _loc_1:* = Cache.instance.role.entityInfo;
            this._levelAndNameAndCarrar.htmlText = _loc_1.level + "级 · " + _loc_1.name + " · <font color=\'#d618dd\'>" + this.getCareer(_loc_1.career) + "</font>";
            return;
        }// end function

        public function updateTitle() : void
        {
            var _loc_1:* = Cache.instance.title.currTitle;
            if (_loc_1)
            {
                this._playerTitle.text = Cache.instance.title.currTitle.titleData.name;
            }
            else
            {
                this._playerTitle.text = "暂无称号";
            }
            return;
        }// end function

        public function updateMedal() : void
        {
            this._medalPanel.medal = MedalUtil.getHeightstMedal();
            return;
        }// end function

    }
}
